<?php

class Breadcrumbs extends CWidget {

    public $links;
    
    public function run() {
        ?>
        <div class="breadcrumbs well well-small">
            <a href="index.php">Home</a>
            <?php 
            foreach ($this->links as $key => $link) {
                if(!is_int($key)){
                    echo "&nbsp;/&nbsp; <span><a href=\"{$link}\">{$key}</a></span>";
                }else{
                    echo "&nbsp;/&nbsp; <span>{$link}</span>";
                }
            } ?>
        </div>
        <?php
    }

}
?>
